Skip to content

Conversation

@Olshansk
Copy link
Collaborator

Changes to accompany review #2 of #1819

@Olshansk Olshansk self-assigned this Oct 15, 2025
@Olshansk Olshansk added the review A PR that's intended as a review of another PR label Oct 15, 2025
@Olshansk Olshansk changed the base branch from main to experiment/eager-optimistic-metrics October 15, 2025 01:48
@Olshansk Olshansk added this to Shannon Oct 15, 2025
@github-project-automation github-project-automation bot moved this to 📋 Backlog in Shannon Oct 15, 2025
@Olshansk Olshansk moved this from 📋 Backlog to 👀 In review in Shannon Oct 15, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements a comprehensive refactoring of the relay miner's request processing pipeline, introducing a new mining supervisor architecture and performance tracking system. The changes transition from a single-threaded relay processing model to a more scalable architecture with dedicated worker pools and sophisticated performance monitoring.

  • Introduces RelayMiningSupervisor with configurable worker pools for delayed validation and rewardability checks
  • Implements a new performance tracking system using buffered span recording for detailed timing analysis
  • Refactors session management to use lock-free concurrent data structures (xsync.Map)

Reviewed Changes

Copilot reviewed 16 out of 17 changed files in this pull request and generated 12 comments.

Show a summary per file
File Description
pkg/relayer/proxy/sync.go Major refactoring of sync request handling with new supervisor integration and performance tracking
pkg/relayer/proxy/mining_supervisor.go New mining supervisor implementation with worker pool and session cache management
pkg/relayer/performance_tracker.go New performance tracking system with span-based timing and buffered metrics
pkg/relayer/proxy/relay_meter.go Converted to use lock-free concurrent data structures and added relay cost memoization
pkg/relayer/metrics.go Added new mining queue metrics and improved instruction timing infrastructure
pkg/relayer/config/types.go Added mining supervisor configuration structures

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

"context"
"strconv"

//"sync"
Copy link

Copilot AI Oct 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove commented-out import. The sync package import has been removed but the comment should be deleted.

Suggested change
//"sync"

Copilot uses AI. Check for mistakes.
"context"
"fmt"

//"sync"
Copy link

Copilot AI Oct 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove commented-out sync import and mutex-related code. These have been replaced with concurrent data structures but the old implementations should be deleted.

Copilot uses AI. Check for mistakes.
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copy link
Contributor

@jorgecuesta jorgecuesta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, most of them are rename and comments

@Olshansk Olshansk merged commit 7a9c588 into experiment/eager-optimistic-metrics Oct 22, 2025
10 of 11 checks passed
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in Shannon Oct 22, 2025
@Olshansk Olshansk deleted the experiment/eager-optimistic-metrics-review branch October 22, 2025 01:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review A PR that's intended as a review of another PR

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

3 participants